package com.wingsboat;


import com.wingsboat.interfaces.FilterContext;
import com.wingsboat.interfaces.FilterSelector;

/**
 * 过滤上下文实现
 *
 * @author wangzhong
 */
public abstract class AbstractFilterContext implements FilterContext {
    private final FilterSelector filterSelector;

    private boolean isContinue;


    protected AbstractFilterContext(FilterSelector filterSelector) {
        this.filterSelector = filterSelector;
        isContinue = true;
    }

    /**
     * 是否中断过滤
     *
     * @return
     */
    @Override
    public boolean isContinue() {
        return isContinue;
    }

    /**
     * 设置continue
     *
     * @param isContinue
     */
    @Override
    public void setIsContinue(boolean isContinue) {
        this.isContinue = isContinue;
    }


    /**
     * 获取过滤选择器
     *
     * @return
     */
    @Override
    public FilterSelector getFilterSelector() {
        return filterSelector;
    }


}
